<?php
namespace app\home\controller;

use app\common\DepartmentModel;
use app\common\UserModel;
use dingtalk\Auth;
use think\Request;
use think\Controller;

class SyncController extends Controller
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
    }

    public function syncDept(){
        $accessToken = Auth::getAccessToken();
        $deptModel = new DepartmentModel();
        $deptModel->syncDept($accessToken);
    }
    public function syncUser(){
        $accessToken = Auth::getAccessToken();
        $userModel = new UserModel();
        $userModel->syncUser($accessToken);
    }

}
